<template>
    <div class="mb-3">
        <swiper :options="swiperOption">
            <swiper-slide v-for="(item,key) in items" :key="key">
                <img class="w-100" :src="item.img" alt="">
            </swiper-slide>
            <div class="swiper-pagination text-right pagination-home pr-3 mb-2"  slot="pagination"></div>
        </swiper>
    </div>
</template>

<script>
    export default {
        props:{
            items:{
                type:Array,
                default(){
                    return []
                }
            }
        },
        name:'HomeSwiper',
        data () {
            return {
                swiperOption: {
                    pagination: {
                        el: '.swiper-pagination'
                    },
                    autoplay:{
                        delay:3000,
                    },
                    loop : true,
                },
            }
        }
    }
</script>

<style lang="scss">
@import "assets/scss/_variables.scss";
.pagination-home{
    .swiper-pagination-bullet{
        opacity: 1;
        border-radius: 2px;
        background: map-get($colors,'white');
        &.swiper-pagination-bullet-active{   
            background: map-get($colors,'info');
        }
    }
}
</style>